<template>
	<view class="check-container" @tap="changeValue">
		<uni-icons v-show="modelValue" type="checkmarkempty" color="#f66" size="16"></uni-icons>
	</view>
</template>

<script>
	export default {
		name:"c-check-box",
		props: {
			modelValue: {
				type: Boolean,
				required: true
			}
		},
		methods: {
			changeValue() {
				this.$emit("update:modelValue", !this.modelValue)
			}
		},
		watch: {
			modelValue(){
				this.$emit('change')
			}
		}
	}
</script>

<style lang="scss" scoped>
.check-container{
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #999;
	border-radius: 2px;
}
</style>